<script setup lang="ts">
import { ElConfigProvider } from 'element-plus'
import en from 'element-plus/es/locale/lang/en'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import { useThemeStoreHook } from './store/modules/theme'
import { computed } from 'vue'

const currentLocale = computed(() => {
  return useThemeStoreHook().locale === 'zh' ? zhCn : en
})
</script>

<template>
  <el-config-provider :locale="currentLocale">
    <router-view />
  </el-config-provider>
</template>
